import request from '@/utils/request'

//获取城市列表
export const getCityList = () =>
  request({
    url: '/interview/filters',
    method: 'get',
    data: {
      needToken: false,
    },
  })

//获取面试题
export const getQuestions = (data) =>
  request({
    url: '/interview/questions',
    method: 'get',
    data: {
      ...data,
      needToken: true,
    },
  })

//提交试题
export const submitAnswer = (data) =>
  request({
    url: '/questions/submit',
    method: 'post',
    data: {
      ...data,
      needToken: true,
    },
  })

//反馈意见
export const feedback = (data) =>
  request({
    url: '/questions/comment',
    method: 'post',
    data: {
      ...data,
      needToken: true,
    },
  })

//收藏试题
export const collectQuestion = (data) =>
  request({
    url: '/questions/collect',
    method: 'post',
    data: {
      ...data,
      needToken: true,
    },
  })
